import request from '@/utils/request'

// 分类列表-分页
export const getCateList = obj => {
  return request.get('/ydd_cate/list', {
    params: obj
  })
}

// 分类添加
export const addCate = obj => {
  return request.post('/ydd_cate/add', {
    catename: obj.catename,
    sort_num: obj.sort_num,
    icon: obj.icon
  })
}

// 分类删除
export const cateDel = id => {
  return request.get('/ydd_cate/del?id=' + id)
}

// 分类详情
export const cateInfo = id => {
  return request.get('/ydd_cate/rowInfo?id=' + id)
}

// 分类修改
export const cateEdit = (obj) => {
  return request.post('/ydd_cate/update', obj)
}
